<%@page contentType="application/json; charset=utf-8"%>
<%@page import="java.util.*,java.io.*,chances.epg.commons.utils.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%!
	public  Map<String, Object> getParams(HttpServletRequest request) {
		Map<String, Object> result = new HashMap<String, Object>();
		Enumeration<String> names = request.getParameterNames();
		for (String key = ""; names.hasMoreElements();) {
			key = names.nextElement();
			result.put(key, request.getParameter(key));
		}
		return result;
   }
%>

<%
	String name = request.getParameter("path");
	Map<String,Map<String,Object>> history = (Map<String,Map<String,Object>>)session.getAttribute("epg_history");
	if(history == null){
		history = new HashMap<String,Map<String,Object>>();
		session.setAttribute("epg_history",history);
	}
	Map<String,Object> values = getParams(request);
	history.put(name,values);
%>
{
  "code"":200,
  "msg","ok",
  "result":<%= %>>
}

